#ifndef __GUI_ROBOT_H__
#define __GUI_ROBOT_H__

#include <QGraphicsItem>
#include <QPixmap>
#include <QRectF>
#include <QPainter>

class GUIRobot : public QGraphicsItem
{
public:
	 GUIRobot(const QPixmap& pix, qreal gridSize = 30)
		: m_size( gridSize ), m_pixmap( pix )
	 {

	 }

     QRectF boundingRect() const
     {
         return QRectF(-m_size/2, -m_size/2, m_size, m_size);
     }

     void paint(QPainter *painter, const QStyleOptionGraphicsItem* , QWidget* )
     {
         painter->drawPixmap ( QRectF(-m_size/2, -m_size/2, m_size, m_size), m_pixmap, QRectF(0,0, m_pixmap.width(), m_pixmap.height()) );
     }

private:
	qreal m_size;
	QPixmap m_pixmap;
};

#endif
